import edu.hunan.cxb18.spring.di.SetterDi;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author chenheng
 * @create 2020-03-10 15:13
 */
public class DiTest02 {

    private ApplicationContext applicationContext;
    @Before
    public void before(){
        applicationContext = new ClassPathXmlApplicationContext("classpath:class02/spring-03.xml");
    }
    @Test
    public void SetterDi(){
        SetterDi setterDi = applicationContext.getBean("setterDi", SetterDi.class);
        System.out.println(setterDi.toString());
    }
}
